package ch.unisi.inf.gui.action;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;

import ch.unisi.inf.editor.ImageEditorFrame;
import ch.unisi.inf.engine.Image;
import ch.unisi.inf.gui.MainFrame;

/**
 * @author bejarj@lu.unisi.ch
 *
 */
public class EditAction extends AbstractAction{
	private MainFrame mainFrame;
	private Image image;
	
	public EditAction(final MainFrame mainFrame, final Image image){
		this.mainFrame = mainFrame;
		this.image = image;
		putValue(Action.NAME, "Edit");
		putValue(Action.MNEMONIC_KEY, KeyEvent.VK_E);
		putValue(Action.SHORT_DESCRIPTION, "Edit Picture");
	}
	
	public void actionPerformed(ActionEvent e) {
		ImageEditorFrame editor = new ImageEditorFrame(this.image);
	}

}
